package com.zyg.date;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;


public class DateTimeFormatterUtil {

    private static final DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    public static String format(LocalDateTime localDateTime){
        return dateTimeFormatter.format(localDateTime);
    }

    public static LocalDateTime parse(String localDateTime){
        return LocalDateTime.parse(localDateTime,dateTimeFormatter);
    }


}
